package br.com.mensures.entitymanager;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class JPAUtil {
	private static EntityManagerFactory emf = Persistence.createEntityManagerFactory("mensures");

	public static EntityManager getEntityManager() {
		if(emf == null){
			emf = Persistence.createEntityManagerFactory("mensures");
		}
		return emf.createEntityManager();
	}
}
